	<div class="Main_Right" >
		<div class="Main_Right_Top"><span></span></div>
		<div class="Main_Right_Content" id="Main_Right_Content">
			  <div class="Main_Right_Title">当前位置：学校管理 --> 专业类型管理 --> 编辑专业类型  </div>
              <!-- Main_information begin -->
			  <div class="Main_handleBar check_pass" id="Main_handleBar" style="display: none"   >
					<div class="Main_handleBar_head"></div>
					<div class="Main_handleBar_body">
						<p></p>
					</div>
			  </div>
			  <form name="thisForm"  id="thisForm" method="post" action="${base}/majortype/edit.action" >
				<input type=hidden name="majortype.id" id="id" value=${majortype.id}>
				<input type=hidden name=isAdmin value=>
			   <div class="Main_Right_ListTable">
					<div class="Main_Right_SearchTable_Title">
						<span class="Main_Right_SearchTable_Title_Left"></span>
						基本信息
						<span class="Main_Right_SearchTable_Title_Right"></span>
					</div>
					<div class="Main_Right_p"  style="padding-left:10px">
						<table border="0" cellspacing="0" cellpadding="0"  width="100%" class="newTable">
							<tr>
								<td class="title"  width="10%">专业类型名称：</td>
								<td class="content"  width="25%">
									<input type="text" class="addtext" id="majorTypeName" name="majortype.majorTypeName" value="${(majortype.majorTypeName)!""}"/>
								</td>			
								<td class="title"  width="10%">职业选择：</td>
								<td class="content"  width="25%">
									<input type="text" class="addtext" id="careerChoices" name="majortype.careerChoices" value="${(majortype.careerChoices)?if_exists}"/>
								</td>
								<td></td>
								<td></td>
							</tr>			
							<tr>
								<td class="title"  width="10%">起薪：</td>
								<td class="content"  width="25%">
									<input type="text" class="addtext" id="startingSalary" name="majortype.startingSalary" value="${(majortype.startingSalary)?if_exists}"/>
								</td>			
								<td class="title"  width="10%"></td>
								<td class="content"  width="25%"></td>
								<td></td>
								<td></td>
							</tr>	
							<tr>
								<td class="title"  width="10%">专业类型概述：</td>
								<td class="content"  colspan='5' style='padding:5px;'>
								    <textarea rows='6' cols='70' id='majorTypeOverview' name='majortype.majorTypeOverview'></textarea>
								</td>
							</tr>			
						</table>
					</div>
		  			<div class="Main_Right_SearchTable_Bottom2"  style="text-align:center;">
						<div  role="button" tabindex="0" class="js-component-button nui-mainBtn nui-btn ">
							<span class="nui-btn-text" onclick="toSubmit(0);"  >保存</span>
						</div>
						<div  role="button" tabindex="0" class="js-component-button nui-mainBtn nui-btn ">
							<span class="nui-btn-text" onclick="goBack('${base}/majortype/list.action')" >返回</span>
						</div>
		 			 </div>
			    </div>
				</form>
		 </div>
	 </div>
	 <script> 
jQuery(document).ready(function($){
		$("table").find("td").removeClass("title");
		$("table").find("td").removeClass("content1");
		$("table").find("th").addClass("nui-table-cell");
		$("table").find("td").addClass("nui-table-cell2");
		$("table").find("input").attr("size","25");
	 	$( "#businessDate" ).datepicker();
		$( "#businessDate" ).datepicker( "option", "dateFormat",'yy-mm-dd' );	
	 	$( "#sendGoodsTime" ).datepicker();
		$( "#sendGoodsTime" ).datepicker( "option", "dateFormat",'yy-mm-dd' );			
});		
function validate(formData, jqForm, options) { 
     if(Validator.Validate(jqForm[0],3)){
      	return true;
     } 
     return false;
}
function toSubmit(type){
		 var form=document.getElementById("thisForm");
	     if(jQuery("#thisForm").valid()){
			//form.action=""
			//$('#thisForm').ajaxSubmit(function(data){
            //    loadNewContent('${base}/majortype/list.action');
            //});     	
            $("#thisForm").ajaxSubmit({  
                    type: 'post',  
                    url: "${base}/majortype/edit.action" ,  
                    success: function(data){  
                        loadNewContent('${base}/majortype/list.action');
                    },  
                    error: function(XmlHttpRequest, textStatus, errorThrown){  
                        alert( "error");  
                    }  
            }); 
		}
}  
function jsSelectItemByValue(objSelect, objItemText) {            
	//判断是否存在        
	var isExit = false;        
	for (var i = 0; i < objSelect.options.length; i++) {        
		if (objSelect.options[i].value == objItemText) {        
			objSelect.options[i].selected = true;        
			isExit = true;        
			break;        
		}        
	}              
} 
//表单验证
jQuery(document).ready(function() {
		var validator = jQuery("#thisForm").validate({
			errorElement: "em",    //单个错误信息显示的包含元素
			errorPlacement: function(error, element) {
			    if(error!=null && error!=""){
					error.appendTo( element.parent("td") );  //找到父元素td的下一个td元素(即在该元素父元素td的下一个td元素中添加错误信息)
				}
			},
			rules: {  
				'majortype.majorTypeName': { 
					required:true,  
					maxlength:50
				},
				'majortype.careerChoices': { 
					required:true,  
					maxlength:50
				},
				'majortype.startingSalary': { 
					required:true,  
					maxlength:50
				},
				'majortype.majorTypeOverview': { 
					maxlength:250
				}
			},
			messages: { 
				'majortype.majorTypeName': {
					required: '必填',
					maxlength: '最多输入50个字符'
				},
				'majortype.careerChoices': {
					required: '必填',
					maxlength: '最多输入250个字符'
				},
				'majortype.startingSalary': {
					required: '必填',
					maxlength: '最多输入250个字符'
				},
				'majortype.majorTypeOverview': {
					maxlength: '最多输入250个字符'
				}
			}
		});
	});
</script>